home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FishMarket 1.0
/
FishMarket v1.0.iso
/
fishies
/
301-325
/
disk_311
/
crobots
/
ninja.r
< prev
next >
Wrap
Text File
|
1992-05-06
|
1KB
|
66 lines
Balkan Enterprises
David Wright
/* ninja reverse thorin */
/* only one routine !! */
main()
{
int Dir,Range;
Dir=Range=0;
while (1) /* main loop */
{
drive(rand(360),100);
while (!(Range=scan(Dir,10)))
Dir += 20;
if (!speed())
while (!speed())
drive(rand(360,100));
Dir -= 20;
while (!(Range=scan(Dir,5)))
Dir += 5;
while (speed() > 49)
{
cannon(Dir,Range);
drive(Dir,0);
}
drive(Dir+180,100);
while (Range = scan(Dir,5))
{
while (Range = scan(Dir,5))
cannon(Dir,Range);
if (Range = scan(Dir, 10))
{
int k;
Dir -= 10;
k = Dir;
while ((!(Range = scan(Dir,5))) &&
(Dir - k <= 30))
Dir += 5; /* fine tuning */
while (speed() > 49)
drive(Dir+180,0);
drive(Dir, 100);
}
} /* if out of this loop? probably passed by. turn around */
Dir += 170;
while (speed() > 49)
drive(0,0);
} /* while */
}